package com.sbio.udiapp.ui.model;

import com.blankj.utilcode.util.StringUtils;
import com.sbio.udiapp.adapter.ListItemData;

import java.math.BigDecimal;
import java.util.Date;

public class RawMaterialListItemView implements ListItemData {

    /**
     * 内部条码
     */
    private String innerBarcode;

    /**
     * 外部条码
     */
    private String outterBarcode;

    /**
     * 物料编码
     */
    private String materialNo;

    /**
     * 物料名称
     */
    private String materialName;

    /**
     * 规格型号
     */
    private String spec;

    /**
     * 批号
     */
    private String lot;

    /**
     * 生产日期
     */
    private Date productDate;

    /**
     * 有效期至
     */
    private Date expiryDate;

    /**
     * 数量
     */
    private Long qty;

    /**
     * 存放位置
     */
    private String address;

    /**
     * 存储温度
     */
    private String temperature;

    /**
     * 收料单单号
     */
    private String receiveBillNo;

    /**
     * 收料单entryId
     */
    private Long receiveEntryId;

    /**
     * 收料单行号
     */
    private Long receiveEntrySeq;

    /**
     * 成品物料名称
     */
    private String parentMaterialName;

    /**
     * 成品规格型号
     */
    private String parentMaterialSpec;

    /**
     * 成品货号
     */
    private String parentMaterialItemNo;

    private String parentMaterialLot;

    private String overControlMode;

    private BigDecimal minIssueQty;

    public String getOverControlMode() {
        return overControlMode;
    }

    public void setOverControlMode(String overControlMode) {
        this.overControlMode = overControlMode;
    }

    public BigDecimal getMinIssueQty() {
        return minIssueQty;
    }

    public void setMinIssueQty(BigDecimal minIssueQty) {
        this.minIssueQty = minIssueQty;
    }

    /**
     * 供应商
     */
    private String supplier;

    public String getSupplier() {
        return supplier;
    }

    public void setSupplier(String supplier) {
        this.supplier = supplier;
    }

    public String getParentMaterialLot() {
        return parentMaterialLot;
    }

    public void setParentMaterialLot(String parentMaterialLot) {
        this.parentMaterialLot = parentMaterialLot;
    }

    public String getParentMaterialName() {
        return parentMaterialName;
    }

    public void setParentMaterialName(String parentMaterialName) {
        this.parentMaterialName = parentMaterialName;
    }

    public String getParentMaterialSpec() {
        return parentMaterialSpec;
    }

    public void setParentMaterialSpec(String parentMaterialSpec) {
        this.parentMaterialSpec = parentMaterialSpec;
    }

    public String getParentMaterialItemNo() {
        return parentMaterialItemNo;
    }

    public void setParentMaterialItemNo(String parentMaterialItemNo) {
        this.parentMaterialItemNo = parentMaterialItemNo;
    }

    public String getOutterBarcode() {
        return outterBarcode;
    }

    public void setOutterBarcode(String outterBarcode) {
        this.outterBarcode = outterBarcode;
    }

    public String getMaterialNo() {
        return materialNo;
    }

    public void setMaterialNo(String materialNo) {
        this.materialNo = materialNo;
    }

    public String getMaterialName() {
        return materialName;
    }

    public void setMaterialName(String materialName) {
        this.materialName = materialName;
    }

    public String getSpec() {
        return spec;
    }

    public void setSpec(String spec) {
        this.spec = spec;
    }

    public String getLot() {
        return lot;
    }

    public void setLot(String lot) {
        this.lot = lot;
    }

    public Date getProductDate() {
        return productDate;
    }

    public void setProductDate(Date productDate) {
        this.productDate = productDate;
    }

    public Date getExpiryDate() {
        return expiryDate;
    }

    public void setExpiryDate(Date expiryDate) {
        this.expiryDate = expiryDate;
    }

    public Long getQty() {
        return qty;
    }

    public void setQty(Long qty) {
        this.qty = qty;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getTemperature() {
        return temperature;
    }

    public void setTemperature(String temperature) {
        this.temperature = temperature;
    }

    public String getReceiveBillNo() {
        return receiveBillNo;
    }

    public void setReceiveBillNo(String receiveBillNo) {
        this.receiveBillNo = receiveBillNo;
    }

    public Long getReceiveEntryId() {
        return receiveEntryId;
    }

    public void setReceiveEntryId(Long receiveEntryId) {
        this.receiveEntryId = receiveEntryId;
    }

    public Long getReceiveEntrySeq() {
        return receiveEntrySeq;
    }

    public void setReceiveEntrySeq(Long receiveEntrySeq) {
        this.receiveEntrySeq = receiveEntrySeq;
    }

    public String getInnerBarcode() {
        return innerBarcode;
    }

    public void setInnerBarcode(String innerBarcode) {
        this.innerBarcode = innerBarcode;
    }
    @Override
    public String getKey() {
        return String.valueOf(receiveEntrySeq);
    }

    @Override
    public String getDisplayText() {
        return StringUtils.format("序号：%s\n物料名称：%s\n数量：%s", receiveEntrySeq, materialName, qty);
    }
}
